package com.spark.client.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/**
 * 星火大模型请求类
 */
public class SparkRequest {
    
    /**
     * 模型版本
     */
    private String model;
    
    /**
     * 用户唯一ID
     */
    private String user;
    
    /**
     * 消息列表
     */
    private List<SparkMessage> messages;
    
    /**
     * 温度参数
     */
    private Double temperature;
    
    /**
     * 核采样阈值
     */
    @JsonProperty("top_p")
    private Double topP;
    
    /**
     * 随机选择参数
     */
    @JsonProperty("top_k")
    private Integer topK;
    
    /**
     * 重复词惩罚值
     */
    @JsonProperty("presence_penalty")
    private Double presencePenalty;
    
    /**
     * 频率惩罚值
     */
    @JsonProperty("frequency_penalty")
    private Double frequencyPenalty;
    
    /**
     * 是否流式返回
     */
    private Boolean stream;
    
    /**
     * 最大 tokens
     */
    @JsonProperty("max_tokens")
    private Integer maxTokens;
    
    /**
     * 工具列表
     */
    private List<Map<String, Object>> tools;
    
    /**
     * 响应格式
     */
    @JsonProperty("response_format")
    private Map<String, Object> responseFormat;
    
    /**
     * 工具选择策略
     */
    @JsonProperty("tool_choice")
    private Object toolChoice;

    // Getters and Setters
    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public List<SparkMessage> getMessages() {
        return messages;
    }

    public void setMessages(List<SparkMessage> messages) {
        this.messages = messages;
    }

    public Double getTemperature() {
        return temperature;
    }

    public void setTemperature(Double temperature) {
        this.temperature = temperature;
    }

    public Double getTopP() {
        return topP;
    }

    public void setTopP(Double topP) {
        this.topP = topP;
    }

    public Integer getTopK() {
        return topK;
    }

    public void setTopK(Integer topK) {
        this.topK = topK;
    }

    public Double getPresencePenalty() {
        return presencePenalty;
    }

    public void setPresencePenalty(Double presencePenalty) {
        this.presencePenalty = presencePenalty;
    }

    public Double getFrequencyPenalty() {
        return frequencyPenalty;
    }

    public void setFrequencyPenalty(Double frequencyPenalty) {
        this.frequencyPenalty = frequencyPenalty;
    }

    public Boolean getStream() {
        return stream;
    }

    public void setStream(Boolean stream) {
        this.stream = stream;
    }

    public Integer getMaxTokens() {
        return maxTokens;
    }

    public void setMaxTokens(Integer maxTokens) {
        this.maxTokens = maxTokens;
    }

    public List<Map<String, Object>> getTools() {
        return tools;
    }

    public void setTools(List<Map<String, Object>> tools) {
        this.tools = tools;
    }

    public Map<String, Object> getResponseFormat() {
        return responseFormat;
    }

    public void setResponseFormat(Map<String, Object> responseFormat) {
        this.responseFormat = responseFormat;
    }

    public Object getToolChoice() {
        return toolChoice;
    }

    public void setToolChoice(Object toolChoice) {
        this.toolChoice = toolChoice;
    }
}
